package com.core.dao;

import java.util.List;
import java.util.Map;

import com.core.entity.BaseEntity;

public interface BaseDAO {


	public <T extends BaseEntity> List<T> getEntityList(Class<T> clazz, String orderBy) ;
	public <T extends BaseEntity> List<T> getEntityList(Class<T> clazz, int firstResult, int maxResults) ;

	public <T extends BaseEntity> T getEntity(Class<T> clazz, Long id) ;

	public <T extends BaseEntity> T getEntity(Class<T> clazz, String paramName, Object value) ;

	public <T extends BaseEntity> List<T> getEntityList(Class<T> clazz, String paramName, Object value, String orderBy) ;

	public <T extends BaseEntity> void addEntity(T entity) ;

	public <T extends BaseEntity> T updateEntity(T entity) ;

	public <T extends BaseEntity> void removeEntity(T entity) ;

	public <T extends Object> List<T> getResultList(String namedQueryName, Map<String, Object> params) ;

	public <T extends Object> T getSingleResultObject(String namedQueryName, Map<String, Object> params) ;

	public <T extends BaseEntity> Integer executeUpdate(String namedQueryName, Map<String, Object> params) ;

	public <T extends Object> List<T> executeNativeQuery(String queryString, Map<String, Object> params, Class<T> clazz) ;

	public <T extends BaseEntity> void removeEntity(Class<T> clazz, Long entityId)  ;
}
